package com.ynny.one_dimensional_array01;

import java.util.Arrays;

public class ArrayDemo04 {
    public static void main(String[] args) {
        int i = 1 * 6;

        int[] arrayInt = new int[i];


        //获取数组的长度
        int length = arrayInt.length;//获取数组的长度

        System.out.println("arrayInt的数组长度:" + length);

        //快速 给 数组 赋值 和 取值
//        arrayInt[0] = 10;
//        arrayInt[1] = 10;
//        arrayInt[2] = 10;
//        arrayInt[3] = 10;
//        arrayInt[4] = 10;
//        arrayInt[5] = 10;

        for (int j = 0; j < arrayInt.length; j++) {
            arrayInt[j] = 10 * j;
        }


        for (int k = 0; k < arrayInt.length; k++) {
            System.out.println(arrayInt[k]);
        }

    }
}
